{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "4fcec2eb",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-10-05T13:02:04.093521Z",
     "start_time": "2023-10-05T13:02:03.981168Z"
    }
   },
   "source": [
    "![image](https://raw.githubusercontent.com/seisbench/seisbench/main/docs/_static/seisbench_logo_subtitle_outlined.svg)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9119cc01",
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install seisbench\n",
    "\n",
    "# If you want to build a catalog, uncomment the line below to install pyproj and GaMMA\n",
    "# !pip install pyproj git+https://github.com/AI4EPS/GaMMA.git"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b4c3ea93",
   "metadata": {},
   "source": [
    "*This cell is required to circumvent an issue with colab and obspy. For details, check this issue in the obspy documentation: https://github.com/obspy/obspy/issues/2547*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "32201450",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-10-05T13:02:31.366961Z",
     "start_time": "2023-10-05T13:02:31.057669Z"
    }
   },
   "outputs": [],
   "source": [
    "try:\n",
    "    import obspy\n",
    "    obspy.read()\n",
    "except TypeError:\n",
    "    # Needs to restart the runtime once, because obspy only works properly after restart.\n",
    "    print('Stopping RUNTIME. If you run this code for the first time, this is expected. Colaboratory will restart automatically. Please run again.')\n",
    "    exit()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "06be4b30",
   "metadata": {},
   "source": [
    "# Exercise template\n",
    "\n",
    "This is a template notebook to run any of the exercises provided. Below are a few helpful imports, otherwise you're on your own. Looking for input? Discuss with your neighbors or ask the instructors."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f6e6ad54",
   "metadata": {},
   "outputs": [],
   "source": [
    "import seisbench.data as sbd\n",
    "import seisbench.models as sbm\n",
    "import seisbench.generate as sbg\n",
    "import obspy\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "484c380e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
